#include <my_head.h>

int main(int argc, const char *argv[]){
    int fd = 0;
    if(-1 == (fd = open("my_fifo",O_RDONLY)))
        ERR_LOG("open error");
    printf("管道文件打开成功\n");
    char buff[128];
    while(1){
        read(fd,buff,sizeof(buff));
        if(!strcmp(buff,"quit")){
            break;
        }
        printf("读到内容 : [%s]\n",buff);
    }
    close(fd);
    return 0;
}